<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>图像工具集合</title>
    <link rel="stylesheet" href="../coding/common.css">
    <link rel="stylesheet" href="https://cdn.bootcdn.net/ajax/libs/font-awesome/6.7.2/css/all.min.css">
    <style>
        /* 基础样式和变量 */
        :root {
            --primary-color: #4a6fa5;
            --secondary-color: #6c8ebd;
            --background-color: #f5f7fa;
            --card-background: #ffffff;
            --text-color: #333333;
            --border-color: #e0e0e0;
            --error-color: #e74c3c;
            --success-color: #2ecc71;
            --shadow-color: rgba(0, 0, 0, 0.1);
            --font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            --tip-background: #e3f2fd;
            --hover-color: #f0f8ff;
        }
        
        /* 暗黑模式变量 */
        [data-theme="dark"] {
            --primary-color: #5b8ad6;
            --secondary-color: #7fa3d7;
            --background-color: #1a1a2e;
            --card-background: #222438;
            --text-color: #e0e0e0;
            --border-color: #444444;
            --shadow-color: rgba(0, 0, 0, 0.3);
            --tip-background: #1a2a3a;
            --hover-color: #2a2a4e;
        }
        
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }
        
        body {
            font-family: var(--font-family);
            background-color: var(--background-color);
            color: var(--text-color);
            line-height: 1.6;
            transition: background-color 0.3s, color 0.3s;
        }
        
        .container {
            max-width: 1400px;
            margin: 0 auto;
            padding: 20px;
            min-height: 100vh;
            display: flex;
            flex-direction: column;
        }
        
        /* 头部样式 */
        header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 30px;
            padding-bottom: 15px;
            border-bottom: 1px solid var(--border-color);
        }
        
        header h1 {
            font-size: 2rem;
            color: var(--primary-color);
        }
        
        .header-controls {
            display: flex;
            align-items: center;
            gap: 15px;
        }
        
        /* 主题切换开关 */
        .theme-toggle {
            position: relative;
        }
        
        .theme-switch {
            opacity: 0;
            position: absolute;
        }
        
        .theme-switch-label {
            display: flex;
            align-items: center;
            justify-content: space-between;
            cursor: pointer;
            width: 50px;
            height: 26px;
            background-color: #83d8ff;
            border-radius: 100px;
            position: relative;
            transition: background-color 0.3s;
            padding: 0 5px;
        }
        
        .theme-switch:checked + .theme-switch-label {
            background-color: #4a4e69;
        }
        
        .theme-switch-label .fa-sun {
            color: #f39c12;
        }
        
        .theme-switch-label .fa-moon {
            color: #f1c40f;
        }
        
        .theme-switch-label .slider {
            position: absolute;
            width: 22px;
            height: 22px;
            border-radius: 50%;
            transition: 0.3s;
            background-color: white;
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
            left: 2px;
        }
        
        .theme-switch:checked + .theme-switch-label .slider {
            transform: translateX(24px);
        }
        
        /* 分享按钮 */
        .share-button {
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 2px 6px;
            background-color: var(--secondary-color);
            color: white;
            border-radius: 15px;
            cursor: pointer;
            font-size: 14px;
            transition: background-color 0.3s, transform 0.1s;
        }
        
        .share-button:hover {
            background-color: var(--primary-color);
        }
        
        .share-button:active {
            transform: scale(0.98);
        }
        
        .share-button i {
            font-size: 16px;
        }
        
        /* 隐私提示框样式 */
        .privacy-notice {
            margin-bottom: 20px;
            animation: fadeIn 0.5s ease-in-out;
        }
        
        .privacy-notice-content {
            display: flex;
            align-items: center;
            background-color: var(--tip-background);
            border-left: 4px solid #2196f3;
            padding: 15px;
            border-radius: 4px;
            box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
            position: relative;
        }
        
        .privacy-notice-content i.fa-shield-alt {
            font-size: 20px;
            color: #2196f3;
            margin-right: 15px;
        }
        
        .privacy-notice-content p {
            flex: 1;
            margin: 0;
            font-size: 14px;
            color: var(--text-color);
        }
        
        .close-notice {
            background: none;
            border: none;
            color: #90a4ae;
            cursor: pointer;
            font-size: 16px;
            padding: 5px;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: color 0.2s;
        }
        
        .close-notice:hover {
            color: #546e7a;
            background: none;
        }
        
        @keyframes fadeIn {
            from {
                opacity: 0;
                transform: translateY(-10px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }
        
        /* 主内容区域 */
        main {
            flex: 1;
            display: flex;
            flex-direction: column;
            gap: 20px;
        }
        
        /* 介绍区域 */
        .intro-section {
            background-color: var(--card-background);
            border-radius: 8px;
            box-shadow: 0 4px 6px var(--shadow-color);
            padding: 25px;
            margin-bottom: 30px;
            text-align: center;
        }
        
        .intro-section h2 {
            color: var(--primary-color);
            margin-bottom: 15px;
            font-size: 1.5rem;
        }
        
        .intro-section p {
            color: var(--text-color);
            font-size: 16px;
            line-height: 1.6;
            margin-bottom: 0;
        }
        
        /* 工具卡片网格 */
        .tools-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
            gap: 20px;
            margin-bottom: 30px;
        }
        
        .tool-card {
            background-color: var(--card-background);
            border-radius: 8px;
            box-shadow: 0 4px 6px var(--shadow-color);
            padding: 25px;
            transition: transform 0.3s, box-shadow 0.3s, background-color 0.3s;
            cursor: pointer;
            text-decoration: none;
            color: inherit;
            display: block;
        }
        
        .tool-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 8px 15px var(--shadow-color);
            background-color: var(--hover-color);
            text-decoration: none;
            color: inherit;
        }
        
        .tool-card-header {
            display: flex;
            align-items: center;
            margin-bottom: 15px;
        }
        
        .tool-card-icon {
            font-size: 2rem;
            color: var(--primary-color);
            margin-right: 15px;
            width: 50px;
            text-align: center;
        }
        
        .tool-card h3 {
            font-size: 1.3rem;
            color: var(--primary-color);
            margin: 0;
        }
        
        .tool-card-description {
            color: var(--text-color);
            font-size: 14px;
            line-height: 1.5;
            margin-bottom: 15px;
        }
        
        .tool-card-features {
            list-style: none;
            padding: 0;
            margin: 0;
        }
        
        .tool-card-features li {
            font-size: 13px;
            color: var(--text-color);
            opacity: 0.8;
            margin-bottom: 5px;
            display: flex;
            align-items: center;
        }
        
        .tool-card-features li i {
            color: var(--success-color);
            margin-right: 8px;
            font-size: 12px;
        }
        
        /* 通知样式 */
        .copy-notification {
            position: fixed;
            bottom: 20px;
            right: 20px;
            background-color: var(--success-color);
            color: white;
            padding: 10px 20px;
            border-radius: 4px;
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
            transform: translateY(100px);
            opacity: 0;
            transition: transform 0.3s, opacity 0.3s;
        }
        
        .copy-notification.show {
            transform: translateY(0);
            opacity: 1;
        }
        
        /* 响应式设计 */
        @media (max-width: 768px) {
            .privacy-notice-content {
                flex-direction: column;
                text-align: center;
                padding: 15px 10px;
            }
            
            .privacy-notice-content i.fa-shield-alt {
                margin-right: 0;
                margin-bottom: 10px;
            }
            
            .close-notice {
                position: absolute;
                top: 5px;
                right: 5px;
            }
            
            header {
                flex-direction: column;
                gap: 15px;
                text-align: center;
            }
            
            .tools-grid {
                grid-template-columns: 1fr;
            }
        }
    </style>
</head>
<body>
    <header>
        <div class="header-container">
            <div class="header-left">
                <div class="logo">
                    <span><a href="https://geekdaxue.co/" target="_blank"><img src="https://geekdaxue.co/static/images/logo_platypus.png" height="30px"></a></span>
                </div>
                <nav class="main-navigation">
                    <div class="nav-item dropdown">
                        <a href="#" class="nav-link">
                            JSON工具 <i class="fas fa-chevron-down"></i>
                        </a>
                        <div class="dropdown-menu">
                            <a href="../json/index.html">JSON 格式化</a>
                            <a href="../json/parser.html">JSON 格式校验</a>
                            <a href="../json/excel.html">JSON 转 Excel/CSV</a>
                            <a href="../json/jsonxml.html">JSON 与 XML 转换</a>
                            <a href="../json/editor.html">JSON 编辑器</a>
                        </div>
                    </div>
                    <div class="nav-item dropdown">
                        <a href="#" class="nav-link">
                            编码转换 <i class="fas fa-chevron-down"></i>
                        </a>
                        <div class="dropdown-menu">
                            <a href="../coding/base64.html">Base64 编码</a>
                            <a href="../coding/urlencoding.html">URL 编码</a>
                            <a href="../coding/md5.html">MD5 加密</a>
                            <a href="../coding/unicode.html">Unicode 转换</a>
                            <a href="../coding/hex_convert.html">进制转换</a>
                        </div>
                    </div>
                    <div class="nav-item dropdown">
                        <a href="#" class="nav-link">
                            文本工具 <i class="fas fa-chevron-down"></i>
                        </a>
                        <div class="dropdown-menu">
                            <a href="../txt/diff.html">文本对比</a>
                            <a href="../txt/replace.html">文本替换</a>
                            <a href="../txt/remove.html">空白行移除</a>
                            <a href="../txt/cn_trans.html">繁简体转换</a>
                        </div>
                    </div>
                    <div class="nav-item dropdown">
                        <a href="#" class="nav-link">
                            图片工具 <i class="fas fa-chevron-down"></i>
                        </a>
                        <div class="dropdown-menu">
                            <a href="../img/2svg.html">图片转 SVG</a>
                            <a href="../img/qr_code.html">二维码生成</a>
                            <a href="../img/barcode.html">条形码生成</a>
                        </div>
                    </div>
                </nav>
            </div>
            <div class="header-controls">
                <div class="theme-toggle">
                    <input type="checkbox" id="theme-switch" class="theme-switch">
                    <label for="theme-switch" class="theme-switch-label">
                        <i class="fas fa-sun"></i>
                        <i class="fas fa-moon"></i>
                        <span class="slider"></span>
                    </label>
                </div>
                <div class="share-button" id="share-button" title="分享给朋友">
                    <i class="fas fa-share-alt"></i>
                    <span>分享</span>
                </div>
            </div>
        </div>
    </header>
    <div class="container">
        <div id="privacy-notice" class="privacy-notice">
            <div class="privacy-notice-content">
                <i class="fas fa-shield-alt"></i>
                <p>安全提示：您的数据仅在本地浏览器中处理，不会上传到服务器，请放心使用！</p>
                <button id="close-notice" class="close-notice" title="关闭提示">
                    <i class="fas fa-times"></i>
                </button>
            </div>
        </div>
        
        <main>
            <div class="intro-section">
                <h2><i class="fas fa-image"></i> 图像处理工具集合</h2>
                <p>提供多种实用的图像处理工具，包括图片格式转换、二维码生成、条码生成等功能。所有工具均在本地运行，保护您的数据隐私。</p>
            </div>

            <div class="tools-grid">
                <a href="2svg.html" class="tool-card">
                    <div class="tool-card-header">
                        <div class="tool-card-icon">
                            <i class="fas fa-vector-square"></i>
                        </div>
                        <h3>图片转SVG工具</h3>
                    </div>
                    <div class="tool-card-description">
                        将位图图片转换为可缩放的SVG矢量图形，支持多种图片格式输入，生成高质量的SVG文件。
                    </div>
                    <ul class="tool-card-features">
                        <li><i class="fas fa-check"></i> 支持多种图片格式</li>
                        <li><i class="fas fa-check"></i> 高质量矢量转换</li>
                        <li><i class="fas fa-check"></i> 可调节转换参数</li>
                        <li><i class="fas fa-check"></i> 实时预览效果</li>
                    </ul>
                </a>

                <a href="qr_code.html" class="tool-card">
                    <div class="tool-card-header">
                        <div class="tool-card-icon">
                            <i class="fas fa-qrcode"></i>
                        </div>
                        <h3>二维码生成工具</h3>
                    </div>
                    <div class="tool-card-description">
                        快速生成二维码，支持文本、网址、联系人信息等多种内容类型，可自定义样式和尺寸。
                    </div>
                    <ul class="tool-card-features">
                        <li><i class="fas fa-check"></i> 多种内容类型支持</li>
                        <li><i class="fas fa-check"></i> 自定义样式设置</li>
                        <li><i class="fas fa-check"></i> 可调节尺寸大小</li>
                        <li><i class="fas fa-check"></i> 高清图片下载</li>
                    </ul>
                </a>

                <a href="barcode.html" class="tool-card">
                    <div class="tool-card-header">
                        <div class="tool-card-icon">
                            <i class="fas fa-barcode"></i>
                        </div>
                        <h3>条码生成工具</h3>
                    </div>
                    <div class="tool-card-description">
                        生成多种格式的条形码，支持EAN、UPC、Code128等标准格式，适用于商品标识和库存管理。
                    </div>
                    <ul class="tool-card-features">
                        <li><i class="fas fa-check"></i> 多种条码格式</li>
                        <li><i class="fas fa-check"></i> 标准规范支持</li>
                        <li><i class="fas fa-check"></i> 自定义尺寸设置</li>
                        <li><i class="fas fa-check"></i> 批量生成功能</li>
                    </ul>
                </a>
            </div>
        </main>
    </div>
    <footer>
            <div class="footer-container">
                <div class="footer-main">
                    <div class="footer-section about-us">
                        <h3>关于我们</h3>
                        <p>我们提供一系列高效、便捷的在线工具，帮助开发者、非技术人员提高工作效率，解决日常开发中遇到的各种问题。</p>
                        <p>Build With <i class="fa-solid fa-heart" style="color: red;"></i> For SF.</p>
                    </div>
                    <div class="footer-section links">
                        <h3>工具导航</h3>
                        <div class="links-columns">
                            <ul>
                                <li><a href="../json/index.html">JSON 工具</a></li>
                                <li><a href="../img/index.html">图片处理</a></li>
                                <li><a href="#">开发工具</a></li>
                            </ul>
                            <ul>
                                <li><a href="../coding/index.html">编码转换</a></li>
                                <li><a href="../txt/index.html">文本工具</a></li>
                            </ul>
                        </div>
                    </div>
                    <div class="footer-section contact">
                        <h3>联系我们</h3>
                        <div class="social-icons">
                            <a href="#" title="GitHub"><i class="fab fa-github"></i></a>
                            <a href="#" title="Twitter"><i class="fab fa-twitter"></i></a>
                            <a href="#" title="WeChat"><i class="fab fa-weixin"></i></a>
                            <a href="mailto:example@example.com" title="Email"><i class="fas fa-envelope"></i></a>
                        </div>
                        <p>如有问题或建议，请随时联系我们</p>
                    </div>
                </div>
                <div class="footer-bottom">
                    <div class="footer-legal">
                        <a href="#">使用条款</a>
                        <a href="#">隐私政策</a>
                    </div>
                </div>
            </div>
        </footer>
    
    <!-- 通知元素 -->
    <div id="copy-notification" class="copy-notification">
        链接已复制到剪贴板！
    </div>
    
    <script>
        // 主题切换功能
        const themeSwitch = document.getElementById('theme-switch');
        const body = document.body;
        
        // 检查本地存储的主题设置
        const savedTheme = localStorage.getItem('theme');
        if (savedTheme) {
            body.setAttribute('data-theme', savedTheme);
            themeSwitch.checked = savedTheme === 'dark';
        }
        
        themeSwitch.addEventListener('change', function() {
            if (this.checked) {
                body.setAttribute('data-theme', 'dark');
                localStorage.setItem('theme', 'dark');
            } else {
                body.removeAttribute('data-theme');
                localStorage.setItem('theme', 'light');
            }
        });
        
        // 分享功能
        const shareButton = document.getElementById('share-button');
        const copyNotification = document.getElementById('copy-notification');
        
        shareButton.addEventListener('click', function() {
            const url = window.location.href;
            
            if (navigator.share) {
                navigator.share({
                    title: '图像工具集合',
                    text: '实用的图像处理工具集合，包括图片转换、二维码生成等功能',
                    url: url
                }).catch(console.error);
            } else {
                // 降级到复制链接
                navigator.clipboard.writeText(url).then(function() {
                    showNotification();
                }).catch(function() {
                    console.error('复制失败');
                });
            }
        });
        
        function showNotification() {
            copyNotification.classList.add('show');
            setTimeout(function() {
                copyNotification.classList.remove('show');
            }, 2000);
        }
        
        // 隐私提示关闭功能
        const privacyNotice = document.getElementById('privacy-notice');
        const closeNotice = document.getElementById('close-notice');
        
        // 检查是否已经关闭过提示
        if (localStorage.getItem('privacy-notice-closed') === 'true') {
            privacyNotice.style.display = 'none';
        }
        
        closeNotice.addEventListener('click', function() {
            privacyNotice.style.display = 'none';
            localStorage.setItem('privacy-notice-closed', 'true');
        });
    </script>
</body>
</html>